import request from '../utils/request'


export function getList(params) {
    return request.get(`/articles`, { params: params })
}

export function addarticles(res){
    return request.post(`/articles`,res)
}

export function getById(id) {
    return request.get(`/comments/${id}`)
}

export function deleteId(id){
    return request.delete(`/articles/${id}`)
}
export function getId(id) {
    return request.get(`/articles/${id}`)
}

export function numReadings(params) {
    return request.get(`/articles/numReadings`,{ params: params })
}

export function latest(params) {
    return request.get(`/articles/latest`,{ params: params })
}
export function addLikes(id) {
    return request.get(`/articles/addLikes/${id}`)
}
export function cancleLikes(id) {
    return request.get(`/articles/cancleLikes/${id}`)
}
export function Likes(params) {
    return request.get(`/articles/Likes`,{ params: params })
}

